"use strict";
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable("<%= tableName.slice(0, 1).toUpperCase() + tableName.slice(1).toLowerCase() %>", {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER,
},
<% for(var i = 0; i < fields.length; i++) { if(fields[i].name !== 'id'){ %>
    <%= fields[i].name %>: Sequelize.<%= fields[i].type.toUpperCase() %>, // <%= fields[i].title %>
<% }
} %>
createdAt: {
allowNull: false,
type: Sequelize.DATE,
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE,
},
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable("<%= tableName.slice(0, 1).toUpperCase() + tableName.slice(1).toLowerCase() %>");
},
};
